<h3 class="my-3">编写一个简单的爬虫</h3>
<hr />
<h5>思路：</h5>
<ul>
  <li>获取需要爬取的URL</li>
  <li>通过URL获得HTML</li>
  <li>通过特殊的class、ID、targetName名称实现精准提取</li>
  <li>将获取的内容入库保存</li>
</ul>
<div class="d-flex align-items-center">
  <button type="button" class="btn btn-primary" (click)="sendPaQu()">爬取</button>
  <div class="flex-group-1 ml-3">
    开始时间：{{this.startTime | date: 'yyyy-MM-dd hh:mm:ss'}},
    结束时间：{{this.endTime | date: 'yyyy-MM-dd hh:mm:ss'}},
    耗时：{{this.timeLong}}毫秒
  </div>
</div>
<hr />


<table class="table table-dark table-bordered">
  <thead>
    <tr>
      <th scope="col">日期</th>
      <th scope="col">累计确诊</th>
      <th scope="col">累计治愈</th>
      <th scope="col">累计死亡</th>
      <th scope="col">现存疑似</th>
      <th scope="col">现存确诊</th>
      <th scope="col">现存重症</th>
      <th scope="col">累计追踪</th>
      <th scope="col">医学观察</th>
    </tr>
  </thead>
  <tbody>
    <ng-container *ngIf="list.length > 0; else elseTemplate">
      <tr *ngFor="let item of list">
        <th scope="row">{{item.k0}}</th>
        <td class="text-light">{{item.k1}}</td>
        <td class="text-secondary">{{item.k2}}</td>
        <td class="text-warning">{{item.k3}}</td>
        <td class="text-primary">{{item.k4}}</td>
        <td class="text-info">{{item.k5}}</td>
        <td class="text-success">{{item.k6}}</td>
        <td class="text-success">{{item.k7}}</td>
        <td class="text-success">{{item.k8}}</td>
      </tr>
    </ng-container>
    <ng-template #elseTemplate>
      <tr>
        <th style="height: 200px;vertical-align: middle;" colspan="9" class="text-center">暂无数据！</th>
      </tr>
    </ng-template>
  </tbody>
</table>
